<script>
	export default {
		globalData:{
			statusBarHeight: 0, // 设备状态栏高度
		},
		onLaunch: function() {
			console.log('App Launch')
			var that = this; 
			uni.getSystemInfo({
				success: function(res) {
					that.globalData.statusBarHeight = res.statusBarHeight
				}
			});
			this.hidePageNavInWechatBrowser()
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		methods:{
			//判断浏览器是否是微信浏览器
			checkIsWechatBrowser(){
				return (
					navigator.userAgent.toLowerCase().match(/MicroMessenger/i) ==
					"micromessenger"
				);
			},
			//微信浏览器中打开H5隐藏顶部导航方法
			hidePageNavInWechatBrowser(){
				//#ifdef H5
				if (this.checkIsWechatBrowser()) {
					let head = document.getElementsByTagName('uni-page-head')
					if (head[0]){
						head[0].style.display = 'none'
					}
				}
				//#endif
			},
		}
	}
</script>

<style lang="scss">
	@import "@/uni_modules/uview-ui/index.scss";
	@import '/style/leiStyle.scss';
	/*每个页面公共css */
	
	page{
		height: 100vh;
		background-color: #f2f2f2;
		// background-image: url('static/backImage/back1.png');
		background-size: 100% 60%;
		background-repeat: no-repeat;
		background-attachment: fixed;
	}
</style>